﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using QCM.Contract1;


namespace WindowsServiceHost
{
    public partial class ServiceHost : ServiceBase
    {
        public ServiceHost()
        {
            InitializeComponent();
            this.ServiceName = "QCMService1";
            this.CanStop = true;
            this.AutoLog = true;
        }
        System.ServiceModel.ServiceHost host;

        protected override void OnStart(string[] args)
        {
			//host = new System.ServiceModel.ServiceHost(typeof(ServiceModel.Service1));
			host = new System.ServiceModel.ServiceHost(typeof(IContractContract));
			host.Open();
        }

        protected override void OnStop()
        {
            host.Close();
        }
    }
}
